import { ElNotification } from 'element-plus'

export const toast = {
  success: (message, title = '成功') => {
    ElNotification({
      title: title,
      message: message,
      type: 'success',
    })
  },
  error: (message, title = '错误') => {
    ElNotification({
      title: title,
      message: message,
      type: 'error',
    })
  },
  warning: (message, title = '警告') => {
    ElNotification({
      title: title,
      message: message,
      type: 'warning',
    })
  },
  information: (message, title = '提示') => {
    ElNotification({
      title: title,
      message: message,
      type: 'info',
    })
  },
}
